import { context } from "../context"

export function useModelMargin({ initMarginV, initMarginH }: {
  initMarginV?: number
  initMarginH?: number
}): string {
  const { resume: { customization } } = context

  const { spacing } = customization
  const { module } = spacing

  const { marginVertical, marginHorizontal } = module || {}

  return `${(marginVertical || 0) + (initMarginV || 0)}mm 
  ${(marginHorizontal || 0) + (initMarginH || 0)}mm`
}
